ConcurrentQueue(T) Constructor (IEnumerable(T))

Task Parallel System.Threading

Initializes a new instance of the ConcurrentQueue<(Of <(T>)>) class that contains elements copied from the specified collection

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	collection As IEnumerable(Of T) _
)
C#
public ConcurrentQueue(
	IEnumerable<T> collection
)

Parameters

collection
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The collection whose elements are copied to the new ConcurrentQueue<(Of <(T>)>).

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThe collection argument is null.

See Also